package com.cls.business.mapper;

import com.cls.business.entity.MemberInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cls.business.vo.MemberInfoVO;
import com.cls.common.annotation.EncryptParam;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 成员信息表 Mapper
 *
 * @author wandering
 * @date 2020-11-12 18:07:06
 */
@Repository
public interface MemberInfoMapper extends BaseMapper<MemberInfo> {
    @Select("select count(0)  from biz_member_info  info " +
            "LEFT JOIN  biz_declare_topic topic on info.declare_id = topic.declare_id " +
            "where topic.is_finish = 0 and topic.is_delete = 0 and info.identity = #{identity} and info.is_delete = 0")
    int getUnFinishNum(@EncryptParam("identity") @Param("identity") String identity);


    List<MemberInfoVO> findByDeclareId(@Param("declareId") Long declareId);
@Select("select  * from biz_member_info where is_delete = 0  ")
    List<MemberInfo> findId();
}
